<template>
	<view class="content">
		<navigator class="yt-list-cell" :url="url" :style="[{padding:padding}]" :class="border" hover-class="cell-hover" :hover-stay-time="50">
			<text :style="[{color:iconColor,'font-size':fontsize}]" :class="['cell-icon coolc',icon]"></text>
			<text class="cell-tit clamp">{{title}}</text>
			<text v-if="tips" class="cell-tip">{{tips}}</text>
			<text class="cell-more coolc" :class="typeList[navigateType]"></text>
		</navigator>
	</view>
</template>
 
<script>
export default {
	data() {
		return {
			typeList: {
				left: 'icon-jiantouleft',
				right: 'icon-jiantouright',
				up: 'icon-jiantoutop',
				down: 'icon-jiantoubottom'
			},
		}
	},
	props: {
		icon: {
			type: String,
			default: ''
		},
		title: {
			type: String,
			default: '标题'
		},
		fontsize: {
			type: String,
			default: '38upx'
		},
		tips: {
			type: String,
			default: ''
		},
		navigateType: {
			type: String,
			default: 'right'
		},
		border: {
			type: String,
			default: 'b-b'
		},
		hoverClass: {
			type: String,
			default: 'cell-hover'
		},
		iconColor: {
			type: String,
			default: '#333'
		},
		padding: {
			type: String,
			default: '10px 15px'
		},
		url: {
			type: String,
			default: '#'
		}
	},
	methods: {

	},
}
</script>

<style lang='scss'>
	.icon .yt-list-cell.b-b:after{
		left:90upx;
	}
	.yt-list-cell{
		display:flex;
		align-items:baseline;
		padding: 20upx $page-row-spacing;
		line-height:60upx;
		position:relative;
		
		&.cell-hover{
			background:#fafafa;
		}
		&.b-b:after{
			left: 30upx;
		}

		.cell-icon{
			align-self:center;
			width:56upx;
			max-height:60upx;
			font-size:38upx;
		}
		.cell-more{
			align-self: center;
			font-size:30upx;
			color:$font-color-base;
			margin-left:$uni-spacing-row-sm;
		}
		.cell-tit{
			flex: 1;
			font-size: $font-base;
			color: $font-color-dark;
			margin-right:10upx;
		}
		.cell-tip{
			font-size: $font-sm+2upx;
			color: $font-color-light;
		}
	}
</style>
